module tb_fulladder16;
	reg [15:0] A;
	reg [15:0] B;
	reg CI;
	wire [15:0] SUM;
	wire CO;

       cla_adder_16 DUB(.A(A), .B(B), .CI(CI),.SUM(SUM),.CO(CO));

       initial
       begin
         //Simple Case
         A = 16'b1001001100010010;
	 B = 16'b0110110011101100;
	 CI = 0;

	 //Case where we have carry out
	#10 A = 16'b1111111111111111;
	 B = 16'b0000000000000001;
	 CI = 0;

	 //Case where we have carry in
        #10 A = 16'b1000000001001110;
	    B = 16'b0000000001001001;
	    CI = 1;
	 
	 
	  //Carrying inside the 16bit
        #10 A = 16'b0000000000101111;
	    B = 16'b0010001000100001;
	    CI = 0;

	 #10 A = 16'b1000000001001110;
	     B = 16'b0101100011111001;
	     CI = 0;

        end

      always@(A,B,CI,SUM,CO)
	begin
	  #5
	  $display("A : %b", A);
	  $display("B : %b", B);
	  $display("CI : %b", CI);
	  $display("S : %b, Cout : %b", SUM, CO);
	end
endmodule
